Optimal. Leaf size=304 \[ -\frac {i b^2}{16 c^3 d^3 (i-c x)^2}+\frac {13 b^2}{16 c^3 d^3 (i-c x)}-\frac {13 b^2 \text {ArcTan}(c x)}{16 c^3 d^3}+\frac {b (a+b \text {ArcTan}(c x))}{4 c^3 d^3 (i-c x)^2}+\frac {7 i b (a+b \text {ArcTan}(c x))}{4 c^3 d^3 (i-c x)}-\frac {7 i (a+b \text {ArcTan}(c x))^2}{8 c^3 d^3}+\frac {i (a+b \text {ArcTan}(c x))^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 (a+b \text {ArcTan}(c x))^2}{c^3 d^3 (i-c x)}-\frac {i (a+b \text {ArcTan}(c x))^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {i b^2 \text {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{2 c^3 d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 304, normalized size of antiderivative = 1.00, number of steps
used = 26, number of rules used = 10, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4996, 4974,
4972, 641, 46, 209, 5004, 4964, 5114, 6745} \begin {gather*} \frac {b \text {Li}_2\left (1-\frac {2}{i c x+1}\right ) (a+b \text {ArcTan}(c x))}{c^3 d^3}+\frac {7 i b (a+b \text {ArcTan}(c x))}{4 c^3 d^3 (-c x+i)}+\frac {b (a+b \text {ArcTan}(c x))}{4 c^3 d^3 (-c x+i)^2}-\frac {2 (a+b \text {ArcTan}(c x))^2}{c^3 d^3 (-c x+i)}+\frac {i (a+b \text {ArcTan}(c x))^2}{2 c^3 d^3 (-c x+i)^2}-\frac {7 i (a+b \text {ArcTan}(c x))^2}{8 c^3 d^3}-\frac {i \log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))^2}{c^3 d^3}-\frac {13 b^2 \text {ArcTan}(c x)}{16 c^3 d^3}-\frac {i b^2 \text {Li}_3\left (1-\frac {2}{i c x+1}\right )}{2 c^3 d^3}+\frac {13 b^2}{16 c^3 d^3 (-c x+i)}-\frac {i b^2}{16 c^3 d^3 (-c x+i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 209
Rule 641
Rule 4964
Rule 4972
Rule 4974
Rule 4996
Rule 5004
Rule 5114
Rule 6745
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{(d+i c d x)^3} \, dx &=\int \left (-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^3 (-i+c x)^3}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^3 (-i+c x)^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^3 (-i+c x)}\right ) \, dx\\ &=-\frac {i \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{(-i+c x)^3} \, dx}{c^2 d^3}+\frac {i \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{-i+c x} \, dx}{c^2 d^3}-\frac {2 \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{(-i+c x)^2} \, dx}{c^2 d^3}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^3 (i-c x)}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {(i b) \int \left (-\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 (-i+c x)^3}+\frac {a+b \tan ^{-1}(c x)}{4 (-i+c x)^2}-\frac {a+b \tan ^{-1}(c x)}{4 \left (1+c^2 x^2\right )}\right ) \, dx}{c^2 d^3}+\frac {(2 i b) \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c^2 d^3}-\frac {(4 b) \int \left (-\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 (-i+c x)^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{c^2 d^3}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^3 (i-c x)}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {(i b) \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{4 c^2 d^3}+\frac {(i b) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{4 c^2 d^3}+\frac {(2 i b) \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{c^2 d^3}-\frac {(2 i b) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{c^2 d^3}-\frac {b \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^3} \, dx}{2 c^2 d^3}-\frac {b^2 \int \frac {\text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c^2 d^3}\\ &=\frac {b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)^2}+\frac {7 i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)}-\frac {7 i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c^3 d^3}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^3 (i-c x)}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^3 d^3}-\frac {\left (i b^2\right ) \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{4 c^2 d^3}+\frac {\left (2 i b^2\right ) \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{c^2 d^3}-\frac {b^2 \int \frac {1}{(-i+c x)^2 \left (1+c^2 x^2\right )} \, dx}{4 c^2 d^3}\\ &=\frac {b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)^2}+\frac {7 i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)}-\frac {7 i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c^3 d^3}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^3 (i-c x)}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^3 d^3}-\frac {\left (i b^2\right ) \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{4 c^2 d^3}+\frac {\left (2 i b^2\right ) \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{c^2 d^3}-\frac {b^2 \int \frac {1}{(-i+c x)^3 (i+c x)} \, dx}{4 c^2 d^3}\\ &=\frac {b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)^2}+\frac {7 i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)}-\frac {7 i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c^3 d^3}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^3 (i-c x)}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^3 d^3}-\frac {\left (i b^2\right ) \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{4 c^2 d^3}+\frac {\left (2 i b^2\right ) \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{c^2 d^3}-\frac {b^2 \int \left (-\frac {i}{2 (-i+c x)^3}+\frac {1}{4 (-i+c x)^2}-\frac {1}{4 \left (1+c^2 x^2\right )}\right ) \, dx}{4 c^2 d^3}\\ &=-\frac {i b^2}{16 c^3 d^3 (i-c x)^2}+\frac {13 b^2}{16 c^3 d^3 (i-c x)}+\frac {b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)^2}+\frac {7 i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)}-\frac {7 i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c^3 d^3}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^3 (i-c x)}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^3 d^3}+\frac {b^2 \int \frac {1}{1+c^2 x^2} \, dx}{16 c^2 d^3}+\frac {b^2 \int \frac {1}{1+c^2 x^2} \, dx}{8 c^2 d^3}-\frac {b^2 \int \frac {1}{1+c^2 x^2} \, dx}{c^2 d^3}\\ &=-\frac {i b^2}{16 c^3 d^3 (i-c x)^2}+\frac {13 b^2}{16 c^3 d^3 (i-c x)}-\frac {13 b^2 \tan ^{-1}(c x)}{16 c^3 d^3}+\frac {b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)^2}+\frac {7 i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^3 d^3 (i-c x)}-\frac {7 i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c^3 d^3}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^3 (i-c x)}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^3 d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.72, size = 431, normalized size = 1.42 \begin {gather*} \frac {\frac {96 i a^2}{(-i+c x)^2}+\frac {384 a^2}{-i+c x}-192 a^2 \text {ArcTan}(c x)+96 i a^2 \log \left (1+c^2 x^2\right )-b^2 \left (128 \text {ArcTan}(c x)^3+72 i \cos (2 \text {ArcTan}(c x))-144 \text {ArcTan}(c x) \cos (2 \text {ArcTan}(c x))-144 i \text {ArcTan}(c x)^2 \cos (2 \text {ArcTan}(c x))-3 i \cos (4 \text {ArcTan}(c x))+12 \text {ArcTan}(c x) \cos (4 \text {ArcTan}(c x))+24 i \text {ArcTan}(c x)^2 \cos (4 \text {ArcTan}(c x))+192 i \text {ArcTan}(c x)^2 \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )+192 \text {ArcTan}(c x) \text {PolyLog}\left (2,-e^{2 i \text {ArcTan}(c x)}\right )+96 i \text {PolyLog}\left (3,-e^{2 i \text {ArcTan}(c x)}\right )+72 \sin (2 \text {ArcTan}(c x))+144 i \text {ArcTan}(c x) \sin (2 \text {ArcTan}(c x))-144 \text {ArcTan}(c x)^2 \sin (2 \text {ArcTan}(c x))-3 \sin (4 \text {ArcTan}(c x))-12 i \text {ArcTan}(c x) \sin (4 \text {ArcTan}(c x))+24 \text {ArcTan}(c x)^2 \sin (4 \text {ArcTan}(c x))\right )-12 a b \left (32 \text {ArcTan}(c x)^2-12 \cos (2 \text {ArcTan}(c x))+\cos (4 \text {ArcTan}(c x))+16 \text {PolyLog}\left (2,-e^{2 i \text {ArcTan}(c x)}\right )+12 i \sin (2 \text {ArcTan}(c x))-i \sin (4 \text {ArcTan}(c x))+4 \text {ArcTan}(c x) \left (-6 i \cos (2 \text {ArcTan}(c x))+i \cos (4 \text {ArcTan}(c x))+8 i \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )-6 \sin (2 \text {ArcTan}(c x))+\sin (4 \text {ArcTan}(c x))\right )\right )}{192 c^3 d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.61, size = 1164, normalized size = 3.83
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1164\) |
default | \(\text {Expression too large to display}\) | \(1164\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^2\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________